export default class Food {
  food:HTMLElement;
  constructor(){
    this.food = document.getElementById('food')!;
    this.change()
  }
  get X (){
    return this.food.offsetLeft;
  }
  get Y (){
    return this.food.offsetTop;
  }
  change(){
    const X = Math.floor(Math.random()*30)*10;
    const Y = Math.floor(Math.random()*30)*10;
    this.food.style.left = X +'px';
    this.food.style.top = Y +'px';

  }

}
